<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="../../tag/c.tld"%>
<!DOCTYPE html>
<html lang="en">
<head>

<title>华集技师管理</title>
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

<link rel="stylesheet" href="../css/bootstrap.css" />
<link rel="stylesheet" href="../css/font-awesome.css" />

<link rel="stylesheet" href="../css/jquery-ui.css" />
<link rel="stylesheet" href="../css/datepicker.css" />

<link rel="stylesheet" href="../css/ace-fonts.css" />

<link rel="stylesheet" href="../css/ace.css" />
<!-- ie9 -->
<link rel="stylesheet" href="../css/ace-part2.css" />
<link rel="stylesheet" href="../css/ace-ie.css" />

<script src="../js/jquery.js"></script>
<script src='../js/ace/jquery.mobile.custom.js'></script>
<script src="../js/ace/bootstrap.js"></script>

<script src="../js/ace/ace/ace.js"></script>
<script src="../js/ace/ace/ace.sidebar.js"></script>
</head>
<body class="no-skin">
<jsp:include page="../../margin/head.jsp"></jsp:include>
<div class="main-container" id="main-container">
	<jsp:include page="../../margin/left.jsp"></jsp:include>
	<div class="main-content">
		<!-- 导航菜单 -->
		<div class="breadcrumbs" id="breadcrumbs">
			<ul class="breadcrumb">
				<li><i class="ace-icon fa fa-home home-icon"></i> <a href="${pageContext.request.contextPath}/setting/list">Home</a></li>
				<li><a href="/LongShengManager/user/list">配置</a></li>
				<li class="active">配置列表</li>
			</ul>
		</div>
		<div class="page-content">
			<div class="main-content-inner">
				<div class="row">
					<div class="col-lg-1 col-xs-2 col-sm-2">
							<button class="btn btn-info btn-sm" type="button" onclick="add()">添加</button>
						</div>
				</div>
				&nbsp;
				<table class="table table-bordered table-striped text-center">
					<thead>
						<tr style="background: #3DB8B8;">
							<th class="text-center">类型</th>
							<th class="text-center">名称</th>
							<th class="text-center">操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${list}" var="setting">
							<tr>
								<td>
									<c:if test="${setting.type == 1}">品牌</c:if>
									<c:if test="${setting.type == 2}">产地</c:if>
									<c:if test="${setting.type == 3}">型号</c:if>
									<c:if test="${setting.type == 4}">系统</c:if>
									<c:if test="${setting.type == 5}">故障描述</c:if>
									<c:if test="${setting.type == 6}">维修类型</c:if>
									<c:if test="${setting.type == 7}">APP配置</c:if>
									<c:if test="${setting.type == 8}">评价标签</c:if>
								</td>
								<td>${setting.name}</td>
								<td>
<%-- 									<button type = "button" class="btn btn-info btn-sm" onclick="edit(${setting.sid})">编辑</button>
 --%>									<button type = "button" class="btn btn-info btn-sm" onclick="deleteSetting(${setting.sid})">删除</button>
								</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			<%-- <div id="page_div">
					<jsp:include page="/margin/paginator.jsp"></jsp:include>
				</div> --%>
			</div>
		</div>
<%-- 		<input type = "hidden" id = "page" value = "${paginator.page}">
		<input type = "hidden" id = limit value = "${paginator.limit}"> --%>
	</div>
</div>
<script type="text/javascript">
/*  var page = $("#page").val();
 var limit = $("#limit").val();
  */
$(function(){
	$(".settingMenSta").addClass("active open");
	$(".settingSta").addClass("active");
});

function add(){
	window.location = "${pageContext.request.contextPath}/setting/add";
};

function edit(Sid){
	window.location = "${pageContext.request.contextPath}/setting/add?userId="+Sid;
};

function deleteSetting(Sid) {
	if (confirm("是否删除")) {
		window.location = "${pageContext.request.contextPath}/setting/delete?Sid=" + Sid;
	}
}

/* function queryAllPerson(pageNow, pageRow) {
	window.location = "${pageContext.request.contextPath}/user/list?pageNow="
			+ pageNow + "&pageRow=" + pageRow;
} */
</script>
</body>
</html>
